<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>添加设备</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
        }

        h1 {
            color: #333;
            text-align: center;
        }

        form {
            background-color: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 400px;
            margin: 0 auto;
        }

        label {
            display: block;
            margin-top: 10px;
            font-weight: bold;
        }

        input[type="text"],
        input[type="date"],
        select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 3px;
            box-sizing: border-box;
        }

        button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            margin-top: 20px;
        }

        button:hover {
            background-color: #45a049;
        }
    </style>
</head>

<body>
<h1>添加设备信息</h1>
<form th:action="@{/add}" method="post">
    <label for="deviceName">设备名称：</label>
    <input type="text" id="deviceName" name="deviceName" ><br>

    <label for="manufacturer">设备制造商：</label>
    <input type="text" id="manufacturer" name="manufacturer" ><br>

    <label for="model">型号：</label>
    <input type="text" id="model" name="model" ><br>

    <label for="installationDate">安装日期：</label>
    <input type="date" id="installationDate" name="installationDate" ><br>

    <label for="lastMaintenanceDate">最后维护日期：</label>
    <input type="date" id="lastMaintenanceDate" name="lastMaintenanceDate"><br>

    <label for="location">设备位置：</label>
    <input type="text" id="location" name="location" ><br>

    <label for="ip">设备 IP 地址：</label>
    <input type="text" id="ip" name="ip" ><br>

    <label for="status">设备状态：</label>
    <select id="status" name="status">
        <option value="0">离线</option>
        <option value="1">在线</option>
        <option value="2">维护中</option>
    </select><br>

    <button type="submit">添加设备</button>
</form>
</body>

</html>